package yao.config;

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;

/**
 * 节点MAP
 * 
 * @author YaoMing
 */
class NodeMap extends LinkedHashMap<String, Node> {

	private static final long serialVersionUID = -3533340335013804446L;

	NodeMap() {
	}

	/**
	 * 节点下的所有子节点，不可修改集合
	 * 
	 * @return
	 */
	List<Node> getNodes() {
		List<Node> list = new ArrayList<Node>(values().size());
		list.addAll(values());
		list = Collections.unmodifiableList(list);
		return list;
	}
}
